package com.driver.fordriver.util;

import android.graphics.drawable.Drawable;
import android.view.View;
import android.widget.ImageView;

import solid.ren.skinlibrary.attr.base.SkinAttr;
import solid.ren.skinlibrary.utils.SkinResourcesUtils;

/**
 * Created by XuYeWen on 2018/1/3.
 */

public class MyIndicatorAttr extends SkinAttr {
    @Override
    protected void applySkin(View view) {
        if (view instanceof ImageView) {
            XywUtil.log("the view is ImageView");
            ImageView tl = (ImageView) view;
            if (RES_TYPE_NAME_DRAWABLE.equals(attrValueTypeName)) {
                Drawable drawable = SkinResourcesUtils.getDrawable(attrValueRefId);
                tl.setImageDrawable(drawable);
                toString();
            }
        }
    }

    @Override
    public String toString() {
        XywUtil.log("the view is ImageView--"+super.toString());
        return super.toString();
    }
}
